package com.fuzongle.tenant.business.service;

import com.fuzongle.tenant.business.entity.Tenant;
import com.fuzongle.tenant.business.mapper.TenantMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * @auther: fuzongle
 * @description: 租户业务层
 */
@Service
public class TenantService {

    @Autowired
    private TenantMapper tenantMapper;

    public void insert() {
        Tenant tenant = new Tenant();
        tenant.setName("租户名字");
        tenantMapper.insert(tenant);
    }

    public void delete() {
        tenantMapper.deleteById("10");
    }

    public void update() {
        Tenant tenant = new Tenant();
        tenant.setName("租户名字");
        tenant.setId(1);
        tenantMapper.updateById(tenant);
    }

    public Object select() {
        return tenantMapper.selectList(null);
    }
}
